package com.wn.ziroom.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wn.ziroom.entity.Cart;
import com.wn.ziroom.entity.CartItem;
import com.wn.ziroom.entity.vo.CartItemVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author wangzhijia
 * @since 2023-02-23 02:27:54
 */
@Mapper
public interface CartItemMapper extends BaseMapper<CartItem> {

    CartItem selectByUserId(@Param("userId") Integer userId);

    int insertByUserId(CartItemVo cartItemVo);

    int updateCartId(@Param("cId") Integer cId);

    CartItem selectByCartItemId(@Param("cartItemVoId") Integer cartItemVoId);

    int updateBuyCountByUserIdAndProId(@Param("userId") Integer userId,@Param("productionId") Integer productionId,@Param("buyCount") Integer buyCount);
}
